#pragma once
#include "lib\pointcalc\PointCalculator.h"
#include "model\Match.h"

class MatchInfo;

class Calc3210 : public PointCalculator {
public:
  Calc3210() {}
  virtual ~Calc3210() {}

  virtual int Calculate(Match& match) const {
    int points = Win();
    if (match.extended())
        points = Extended();
    else if (match.home_score() == match.guest_score())
      points = Draw();
    else if (match.home_score() < match.guest_score())
      points = Loss();
    return points;
  }

private:
  virtual int Win() const { return 3; }
  virtual int Draw() const { return 1; }
  virtual int Loss() const{ return 0; }
  virtual int Extended() const { return 2; }
};